1. Field of the Invention
This invention relates to computer interfaces and more particularly relates to converting a synchronous interface into an asynchronous interface.
2. Description of the Related Art
Generally, computer code runs more efficiently when it is written in a modular format. The most common code configurations include a main block of code which calls other peripheral blocks of code to perform certain tasks and return the results of those tasks. In most cases, the main code expects the results to be returned in a particular format. The particular format expected for the return is commonly referred to as the return type. The term “type,” as used herein, refers to the format of the return object as commonly used in the art of computer programming. The peripheral blocks of code are often referred to as functions, modules, methods, and other like terms. As used herein, the peripheral blocks of code are referred to as functions.
Interactions between the main code and the functions take place using interfaces. An interface may include a function call wherein the main code initiates a transaction with the function, and may also include a return port through which the function returns a value of a predetermined type to the main code. Typically, the interfaces require that certain parameters get passed to the function in a function call, and that the returned value be of a specific, commonly predetermined, type.
Similarly, transactions between computing devices must often conform to predetermined standards and formats. A communication from a first computing device to a second computing device is essentially just a function call from a main code on the first computing device to a function on the second computing device and the associated return. As used herein, the main code is referred to as the requestor. A requester may additionally include a function that calls another function, a computing device that requests a transaction with another computing device, and the like.
For example, an application on a client of a storage server may request that the storage server create a volume on the storage medium to store data generated by the application. The application code sends a request to the storage server, the storage server creates the volume on the storage medium, and the storage server returns a confirmation that the volume has been created. In this example, the request from the application is similar to a function call. Indeed, the request may be the direct result of a function call. The confirmation that the storage server sends back is like the return value that the function returns. Likewise, the application expects that the returned confirmation will be in a specific predetermined format. The request and associated return are herein referred to as transactions.
The example above describes a typical synchronous interface. An interface is synchronous if the requestor stops and waits until the function completes the requested task and returns a return object of the expected type. An interface is asynchronous if the requestor does not stop processing other jobs while waiting for the return object of the expected type. Asynchronous interfaces are generally much more efficient, because the code or application does not have to wait for a return object for each request before sending the next request. Additionally, asynchronous interfaces allow the application or code to process other tasks as well as sending and receiving transactions simultaneously.
For example, in an asynchronous system an application sends a request to a storage server to create a new volume on the storage medium. The application may then send an additional request for data stored in a file prior to receiving the return object from the first request confirming that the volume was created. In an asynchronous system, the idle time between requests and returns is greatly reduced.
It is clear from the example above, that in many cases an asynchronous interface is far superior, in terms of performance, to a synchronous interface. Unfortunately, converting a synchronous interface into an asynchronous interface has not traditionally been an easy task to accomplish. If attempted at all, converting the interface has required extensive modifications to the synchronous code and potential hardware changes.
From the foregoing discussion, it should be apparent that a need exists for an apparatus, system, and method that convert a synchronous interface into an asynchronous interface. Beneficially, such an apparatus, system, and method would increase processing performance. Additionally, system and network performance may be greatly improved where the apparatus, system, and method are implemented in a system or network environment. Most notably, implementation of such an apparatus, system, and method may not require modification of existing interface code or hardware.